package com.jeecms.wicool.manager.car.impl;




import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeecms.common.hibernate3.Updater;
import com.jeecms.wicool.dao.car.CarImgDao;
import com.jeecms.wicool.entity.car.CarImg;
import com.jeecms.wicool.manager.car.CarImgMng;

@Service
@Transactional
public class CarImgMngImpl implements CarImgMng {
	
	private CarImgDao dao;
	@Autowired
	public void setDao(CarImgDao dao) {
		this.dao = dao;
	}
	
	@Override
	public CarImg deleteById(Integer id) {
		CarImg bean = dao.deleteById(id);
		return bean;
	}
	@Override
	public CarImg update(CarImg bean) {
		Updater<CarImg> updater = new Updater<CarImg>(bean);
		bean = dao.updateByUpdater(updater);
		return bean;
	}
}